import request from '@/utils/request'
import http from '@/utils/http'
export function login(data) {
  return request({
    url: '/vue-admin-template/user/login',
    method: 'post',
    data
  })
}

// export function getInfo(token) {
//   return request({
//     url: '/vue-admin-template/user/info',
//     method: 'get',
//     params: { token }
//   })
// }
//获取用户信息
export const getInfo = async(parm) => {
  return await http.get("/api/login/getInfo",parm)
}
export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
//登录
export const loginApi = async(parm)=>{
  return await http.post("/api/login/login",parm)
}
//获取菜单
export const getMenuListApi = async(parm)=>{
  return await http.get("/api/login/getMenuList",parm)
}
//首页统计
export const getTotalApi = async()=>{
  return await http.get("/api/home/getTotal",null)
}
//获取验证码
export const getImageApi = ()=>{
  return http.post("/api/login/image")
}
//修改密码
export const updatePasswordApi = async(parm) =>{
  return await http.post("/api/login/updatePassword",parm)
}